import Vue from 'vue'
import App from './App'
import store from './store'
import uView from "uview-ui";

Vue.use(uView);

Vue.config.productionTip = false

App.mpType = 'app'

var home_path = 'https://www.gkksa.com/';
Vue.prototype.$title = '吉考通';
Vue.prototype.$serverUrl = home_path + 'api';
Vue.prototype.$store = store;

Vue.prototype.$download_path = home_path + 'h5/download.html?spread=';
Vue.prototype.$share_image_path = home_path + 'system/images/logo.png';

const app = new Vue({
	store,
	...App
})
app.$mount()

Vue.prototype.$toast_success = function(t) {
	uni.showToast({
		title: t,
		icon: "success",
	})
}

Vue.prototype.$toast_fail = function(data) {
	uni.showToast({
		title: data.msg,
		icon: "none",
	})
	if(data.status == 410000){
		uni.navigateTo({
			url:'/pages/login/login'
		})
	}
}

Vue.prototype.$tabBarList = 
[{
	iconPath: home_path + "h5/icon/live.png",
	selectedIconPath: home_path + "h5/icon/live_slc.png",
	text: '直播',
	customIcon: false,
	pagePath: "/pages/live/live"
},
{
	iconPath: home_path + "h5/icon/cooperate.png",
	selectedIconPath: home_path + "h5/icon/cooperate_slc.png",
	text: '合作',
	customIcon: false,
	pagePath: "/pages/cooperate/cooperate"
},
{
	iconPath: home_path + "h5/icon/home.png",
	selectedIconPath: home_path + "h5/icon/home_slc.png",
	text: '首页',
	midButton: true,
	customIcon: false,
	pagePath: "/pages/index/index"
},
{
	iconPath: home_path + "h5/icon/data.png",
	selectedIconPath: home_path + "h5/icon/data_slc.png",
	text: '资料',
	customIcon: false,
	pagePath: "/pages/data/data"
},
{
	iconPath: home_path + "h5/icon/my.png",
	selectedIconPath: home_path + "h5/icon/my_slc.png",
	text: '我的',
	customIcon: false,
	pagePath: "/pages/my/my"
},];